using System;

namespace CxRomos.Core.Domain.Entities {
    public class ProfileAttribute {
        public ProfileAttribute() {}

        public virtual int ProfileAttributeId { get; set; }
        public virtual int ProfileId { get; set; }
        public virtual int ProfileAttributeTypeId { get; set; }
        public virtual string Response { get; set; }
        public virtual DateTime? CreatedDate { get; set; }

        public override int GetHashCode() {
            var toReturn = base.GetHashCode();
            toReturn ^= ProfileAttributeId.GetHashCode();

            return toReturn;
        }

        public override bool Equals(object obj) {
            if(obj == null) {
                return false;
            }

            var toCompareWith = obj as ProfileAttribute;
            return toCompareWith == null ? false : (ProfileAttributeId == toCompareWith.ProfileAttributeId);
        }
    }
}